﻿using System;
using System.Runtime.Serialization;

namespace Dynamic.Data.Model.DynamicEntities.Properties
{
    [Serializable]
    [DataContract]
    public class LongProperty : Property
    {
         private long valueField;

        public LongProperty()
        {
        }

        public LongProperty(string name, long value)
        {
            base.Name = name;
            this.Value = value;
        }

        internal override object GetValue()
        {
            return this.Value;
        }

        internal override void SetValue(object value)
        {
            this.Value = (long) value;
        }

        [DataMember]
        public long Value
        {
            get
            {
                return this.valueField;
            }
            set
            {
                this.valueField = value;
            }
        }
    }
}
